package com.entfrm.biz.it.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.entfrm.core.base.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.entfrm.core.data.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import java.util.ArrayList;
import java.util.List;

/**
 * @author kyc
 * @date 2020-08-07 14:07:33
 *
 * @description 资产分类对象 PropertyCategory
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("it_property_category")
public class PropertyCategory extends BaseEntity{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    @Excel(name = "编号")
    @TableId
    private Integer id;

    /** 分类名 */
    @Excel(name = "分类名")
    private String name;

    /** 父级分类id */
    private Integer parentId;

    /** 祖级列表 */
    private String ancestors;

    /** 排序 */
    @Excel(name = "排序")
    private Integer sort;

    /**
    * 子菜单
    */
    @TableField(exist = false)
    private List<PropertyCategory> children = new ArrayList<>();
}
